package chapter2;
import java.util.Scanner;
/****************************************************************
 * Author: icynlau
 * Description:计算两点间距
 * Others:  
 * Date:2021/3/31
 * ***************************************************************
 */
public class exc2_15 {
	public static void main(String[] args) {
		
		Scanner input=new  Scanner(System.in);
		
		System.out.println("Enter x1 and y1:");
		double x1=input.nextDouble();
		double y1=input.nextDouble();
		System.out.println("Enter x2 and y2:");
		double x2=input.nextDouble();
		double y2=input.nextDouble();
		
		System.out.format("The distance between the two points is %.15f", Math.sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)));
	}
}
